<template>
	<view class="cart-goods">
		<view class="left" @click="$u.route(`/pages/goods/detail?id=${goods.goodsId}`)">
			<Img :src="goods.goodsImage" :customStyle="{width:'130rpx',height:'130rpx'}" />
		</view>
		<view class="right">
			<view class="name u-font-bold u-main-color u-font-26">
				{{goods.goodsName}} {{goods.goodsSpec}}
			</view>
			<view class="u-flex u-row-between">
				<price :price="goods.goodsPrice" />
				<addCart :goods="goods" />
			</view>
		</view>
	</view>
</template>

<script>
	import Img from "@/components/goods/img.vue"
	import price from "@/components/goods/price.vue"
	import addCart from '@/components/goods/addCart.vue'
	export default{
		components:{ Img, price, addCart },
		props:{
			goods:{
				type:Object
			}
		},
		data(){
			return {
				
			}
		}
	}
</script>

<style lang="scss" scoped>
	.cart-goods{
		display: flex;
		align-items: center;
		flex: 1;
		.left{
			flex-shrink: 0;
		}
		.right{
			margin-left: 16rpx;
			display: flex;
			flex-direction: column;
			justify-content: space-between;
			height: 130rpx;
			flex: 1;
		}
	}
</style>
